# $OpenBSD: Makefile,v 1.5 2016/05/15 20:21:23 sthen Exp $

PKG_ARCH=	*

COMMENT=	patched fonts with symbols for powerline/airline

V=		0.20151211
DISTNAME=	powerline-fonts-$V

CATEGORIES=	fonts

HOMEPAGE=	https://powerline.readthedocs.org/en/latest/

# see wrksrc/README.rst - SIL OFL, Apache 2.0, Ubuntu/DejaVu Font Licenses
PERMIT_PACKAGE_CDROM=	Yes

GH_ACCOUNT=	powerline
GH_PROJECT=	fonts
GH_COMMIT=	a44abd0e742ad6e7fd8d8bc4c3cad5155c9f3a92

NO_BUILD=	Yes
NO_TEST=	Yes

FONTS_DIR=	${PREFIX}/share/fonts/powerline

do-install:
	${INSTALL_DATA_DIR} ${FONTS_DIR} ${DOCS_DIR}
	cd ${WRKDIR}/fonts-${GH_COMMIT}; pax -rw [A-Z]* ${FONTS_DIR}
	chown -R ${SHAREOWN}:${SHAREGRP} ${FONTS_DIR}
	mv ${FONTS_DIR}/Terminus/PCF/* ${FONTS_DIR}/Terminus
	rm -rf ${FONTS_DIR}/Terminus/{BDF,PSF}
	rmdir ${FONTS_DIR}/Terminus/PCF
	rm -f ${FONTS_DIR}/*/fonts.dir ${FONTS_DIR}/*/fonts.scale

.include <bsd.port.mk>
